calculate compound interest in c